<?php
namespace app\controller;

use app\BaseController;
use app\model\User;

class Index extends ApiBaseController
{
    public function index()
    {
        $arr = ['name' => 'lisi', 'age' => 18];
        return $this->successReturn("获取成功", $arr);
    }

    public function users()
    {
        $users = User::select()->toArray();
        return $this->successReturn("获取成功", ['users' => $users]);
    }
}
